Then read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
My command line is:
g++ -L/home/claudio/Scrivania/ProvaShared/bin/Release -o bin/Release/TestShared obj/Release/main.o -s -lProvaShared
obj/Release/main.o: In function `main'
My .so is called "libProvaShared.so"
This invocation sems to be right.
But I have this error:
main.cpp:(.text+0x3c): undefined reference to `SampleFunction1()'
main.cpp:(.text+0x41): undefined reference to `SampleFunction1()'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warn
This is my simple program:
#include <iostream>
//prototype
int SampleFunction1();
int main()
{
SampleFunction1();
std::cout <<SampleFunction1()<< endl;
return 0;
}