Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Argument line problems (for image processing) in Eclipse C++
Argument line problems (for image processing) in Eclipse C++ [message #1777852] Tue, 05 December 2017 05:23 Go to next message
Eclipse UserFriend
Hello everyone,

I would like to do image processing in C++ in eclipse and I wanted to test a simple code on a data of type .tif. My image name is "V.tif", I declared it in the argument configuration (see joint image: config_argument). Here's my code:

int main(int argc, char **argv)
{

	for(int i=0;i<100;i++)
	{
		printf("V[%d] is %.5g \n",i,V[i]);
	}

    return 0;
}


and here are the errors that I have:

make all 
g++ -c    weights.cpp -o weights.o -g -O3 -funroll-loops -fomit-frame-pointer  -ffast-math -ftree-vectorize     -Wall -Wextra  -Wno-write-strings  -Wno-deprecated -fopenmp  -I/usr/local/include/
weights.cpp: Dans la fonction 'int main(int, char**)':
weights.cpp:110:31: erreur: 'V' was not declared in this scope
weights.cpp: At global scope:
weights.cpp:102:5: attention : unused parameter 'argc' [-Wunused-parameter]
weights.cpp:102:5: attention : unused parameter 'argv' [-Wunused-parameter]
make: *** [weights.o] Erreur 1
Makefile:25 : la recette pour la cible « weights.o » a échouée

So according to the error "V" is not recognized, should I change the format of "V"? Is there something else to do in terms of configuration of the argument line ?

Thanks in advance for your help.

-J

[Updated on: Tue, 05 December 2017 05:24] by Moderator

Re: Argument line problems (for image processing) in Eclipse C++ [message #1777871 is a reply to message #1777852] Tue, 05 December 2017 08:33 Go to previous message
Eclipse UserFriend
V.tif is the name of a file. '.tif' is a common ending of a particular image file name but can mean anything.
V[i] is an element of an array in your program which you need to define.
Two different things called 'V'.

The compiler knows nothing about the runtime arguments of the program.
You need to somehow get the contents of V.tif into your program to manipulate them.
You need to tell your program how to do this.
The compiler doesn't know what you are trying to do.
It's all up to you.





[Updated on: Tue, 05 December 2017 08:44] by Moderator

Previous Topic:MINGW_HOME Relative Path (code cannot be debugged)
Next Topic:Optimize for Debug & Breakpoints
Goto Forum:
  


Current Time: Wed Jul 23 16:24:10 EDT 2025

Powered by FUDForum. Page generated in 0.02967 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top