C
Cottonwood
I want to call a GNU-Fortran-library from a GNU-C++ source. Is that
possible at all? If yes, what is to be done to link the program?
I get an error message that says that the module MAIN_ cannot be found.
The library withe the fortran modules is known in the project. If I try
to add more Fortran libraries to the project the Dev-Cpp aborts
completely.
Edit: 16:56
I tried to test again. Because I couldn't save the project, I opened a
new one. Strange to say but now I got error messages at compile time so
that I had to add the "extern void" statements.
Here the program:
#include <windows.h>
#include <conio.h>
extern void qqopen(int,int,char);
extern void qqpoint(int,int);
extern void qqline(int,int);
extern void qqclose();
int main()
{
int ix, iy;
ix=1201; iy=1001;
qqopen(ix,iy,'.\\qqtest.bmp');
ix=10;iy=10;
qqpoint(ix,iy);
ix=1190; iy=990;
qqline(ix,iy);
qqclose();
}
Now I get linkage messages meaning that the library modules couldn'd be
found. From this reason I dont get the message with the missing MAIN_
atthis time. But it will come back I think. Here the toc of the modlib:
qqbord.o
qqcircle.o
qqclose.o
qqfill.o
qqline.o
qqopen.o
qqor.o
qqplot.o
qqpoint.o
qqrandom.o
qqwhite.o
And here the actual messages:
F:\C\Dev-Cpp\bin\main.o In function `main':
[Linker error] undefined reference to
`qqopen(int, int, char)'
[Linker error] undefined reference to
`qqpoint(int, int)'
[Linker error] undefined reference to
`qqline(int, int)'
[Linker error] undefined reference to
`qqclose()'
F:\C\Dev-Cpp\bin\main.o ld returned 1 exit status
F:\C\Dev-Cpp\Makefile.win [Build Error] [QQPlot.exe] Error 1
What am I doing wrong?
possible at all? If yes, what is to be done to link the program?
I get an error message that says that the module MAIN_ cannot be found.
The library withe the fortran modules is known in the project. If I try
to add more Fortran libraries to the project the Dev-Cpp aborts
completely.
Edit: 16:56
I tried to test again. Because I couldn't save the project, I opened a
new one. Strange to say but now I got error messages at compile time so
that I had to add the "extern void" statements.
Here the program:
#include <windows.h>
#include <conio.h>
extern void qqopen(int,int,char);
extern void qqpoint(int,int);
extern void qqline(int,int);
extern void qqclose();
int main()
{
int ix, iy;
ix=1201; iy=1001;
qqopen(ix,iy,'.\\qqtest.bmp');
ix=10;iy=10;
qqpoint(ix,iy);
ix=1190; iy=990;
qqline(ix,iy);
qqclose();
}
Now I get linkage messages meaning that the library modules couldn'd be
found. From this reason I dont get the message with the missing MAIN_
atthis time. But it will come back I think. Here the toc of the modlib:
qqbord.o
qqcircle.o
qqclose.o
qqfill.o
qqline.o
qqopen.o
qqor.o
qqplot.o
qqpoint.o
qqrandom.o
qqwhite.o
And here the actual messages:
F:\C\Dev-Cpp\bin\main.o In function `main':
[Linker error] undefined reference to
`qqopen(int, int, char)'
[Linker error] undefined reference to
`qqpoint(int, int)'
[Linker error] undefined reference to
`qqline(int, int)'
[Linker error] undefined reference to
`qqclose()'
F:\C\Dev-Cpp\bin\main.o ld returned 1 exit status
F:\C\Dev-Cpp\Makefile.win [Build Error] [QQPlot.exe] Error 1
What am I doing wrong?