Thanks for the reply; now I don't get the undefined reference to printf. But consequently, I am getting another undefined reference, this time to the print function. I tried add an underscore but it still produces the same problem. It also continues to complain about multiple definitions. Here is the errors below.
- Find answers to undefined reference to 'fprint' on dev c/c from the expert community at Experts Exchange.
- I'm trying to run my program, but it keeps giving an error. I have 3 files and will include the code from one of the 3 functions that are not working. File: contacts.
- I haven't written any c code in 3 months, so I'm little rusty. But today I opened an old project and tried to compile it and I got this error: Undefined reference to 'intro' Undefined reference to 'menu(int'.
- Nov 25, 2012 Check out for more free engineering tutorials and math lessons! C Programming Tutorial: Undefined and uninitialized variables.
I am using Dev-C++ to create a dll file which will link Java-JNI-C-Fortran
The project contains CCode.C and JavaCode.h and when I compile, I find the following error: Linker Error>Undefined referece to 'sumsqauredf'
The CCode.C file is
<< moderator edit: added '>[code][/code] tags >>
The JavaCode.h is
<< moderator edit: added '>[code][/code] tags >>
The Fortran file FortranCode.f is
C FortranCode.f
C FortranCode.f
<< moderator edit: added '>[code][/code] tags >>
How can I solve this prob?
Thanks
Rony
Rony
- 2 Contributors
- forum 1 Reply
- 271 Views
- 6 Hours Discussion Span
- commentLatest Postby NarueLatest Post
Narue5,707
Hi,
Below is the source file and make file I 'm using. while building I'm getting the below error in the console. From the error its evident that its unable to find function definition .Can anybody help me to fix this.
Below is the source file and make file I 'm using. while building I'm getting the below error in the console. From the error its evident that its unable to find function definition .Can anybody help me to fix this.
Console output:-
**** Build of configuration Debug for project Threading ****
**** Build of configuration Debug for project Threading ****
make -k all
Building file: ../Threading01.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF'Threading01.d' -MT'Threading01.d' -o'Threading01.o' '../Threading01.cpp'
Finished building: ../Threading01.cpp
Building file: ../Threading01.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF'Threading01.d' -MT'Threading01.d' -o'Threading01.o' '../Threading01.cpp'
Finished building: ../Threading01.cpp
Building target: Threading.exe
Invoking: GCC C++ Linker
g++ -o'Threading.exe' ./Threading01.o
./Threading01.o: In function `main':
D:z_sdkThreadingDebug/../Threading01.cpp:28: undefined reference to `_imp__pthread_create'
D:z_sdkThreadingDebug/../Threading01.cpp:38: undefined reference to `_imp__pthread_join'
collect2: ld returned 1 exit status
make: *** [Threading.exe] Error 1
make: Target `all' not remade because of errors.
Build complete for project Threading
Invoking: GCC C++ Linker
g++ -o'Threading.exe' ./Threading01.o
./Threading01.o: In function `main':
D:z_sdkThreadingDebug/../Threading01.cpp:28: undefined reference to `_imp__pthread_create'
D:z_sdkThreadingDebug/../Threading01.cpp:38: undefined reference to `_imp__pthread_join'
collect2: ld returned 1 exit status
make: *** [Threading.exe] Error 1
make: Target `all' not remade because of errors.
Build complete for project Threading
My Code:-
Below is the make file
- 2 Contributors
- forum 2 Replies
- 1,249 Views
- 13 Hours Discussion Span
- commentLatest Postby gusano79Latest Post
C++ Undefined Reference To Function
![C function from cpp undefined reference C function from cpp undefined reference](/uploads/1/2/6/1/126106233/852992416.png)