Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:23 Go to next message
J M is currently offline J MFriend
Messages: 7
Registered: November 2017
Junior Member
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.


[Updated on: Tue, 05 December 2017 10:24]

Report message to a moderator

Re: Argument line problems (for image processing) in Eclipse C++ [message #1777871 is a reply to message #1777852] Tue, 05 December 2017 13:33 Go to previous message
David VavraFriend
Messages: 776
Registered: October 2012
Senior Member
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 13:44]

Report message to a moderator

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

Current Time: Fri Sep 21 21:07:35 GMT 2018

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

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

Back to the top