Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compiling rtlib with devcpp
#1
Hello,

I tried to compile rtlib (from cvs) with devcpp. All the files in the directory src/rtlib are compiled but it stopped with the first *.c file in src/rtlib/win32 with the following message:
Code:
...
gcc -c -O3 -I ./ -DTARGET_WIN32 -DTARGET_X86 libfb_time_timeset.c -o obj/win32/libfb_time_timeset.o
gcc -c -O3 -I ./ -DTARGET_WIN32 -DTARGET_X86 win32/libfb_file_dir.c -o obj/win32/libfb_file_dir.o
win32/libfb_file_dir.c:32:16: fb.h: No such file or directory
win32/libfb_file_dir.c:77: error: syntax error before "FBSTRING"
win32/libfb_file_dir.c:77: error: syntax error before '*' token
win32/libfb_file_dir.c: In function `fb_Dir':
win32/libfb_file_dir.c:79: error: `FBSTRING' undeclared (first use in this function)
win32/libfb_file_dir.c:79: error: (Each undeclared identifier is reported only once
win32/libfb_file_dir.c:79: error: for each function it appears in.)
win32/libfb_file_dir.c:79: error: `res' undeclared (first use in this function)
win32/libfb_file_dir.c:83: error: `filespec' undeclared (first use in this function)
win32/libfb_file_dir.c:96: error: `attrib' undeclared (first use in this function)
win32/libfb_file_dir.c:110: error: `fb_strNullDesc' undeclared (first use in this function)
win32/libfb_file_dir.c:118: error: syntax error before ')' token
make: *** [obj/win32/libfb_file_dir.o] Error 1

Then I changed the make file in line 24:
Code:
CFLAGS := -O3 -I ./
to:
Code:
CFLAGS := -O3 -I .

This way it compiled without an error!

cu, helpy
Reply
#2
I have no problems compiling rtl of fbc. Big Grin

Here what I did:
1.) Make sure to set the proper makefile under the 'Project Options'
2.) Create the output directories (suppose this is what goes wrong in your case)
3.) Compile
4.) ENJOY

I didn't had to change the makefile at all.

Regarding point 2:
if your files are located at:
dev-cpp\projects\rtlib\
you have to create :
dev-cpp\projects\rtlib\obj\win32
for windows, or:
dev-cpp/projects/rtlib/obj/linux
for linux.

Also the following directory needs to be created:
dev-cpp\lib\win32\
otherwise libfb.a can't be generated.

Hope didn't forget anything.
Reply
#3
I had to copy *.h from the rtlib folder to the rtlib/win32 folder to get it to compile here.
Reply
#4
Quote:Here what I did:
1.) Make sure to set the proper makefile under the 'Project Options'
2.) Create the output directories (suppose this is what goes wrong in your case)
3.) Compile
4.) ENJOY

ad 1) I do not use the IDE of Dev-C++! In a batch file I set the path to:
Code:
@set PATH=D:\Programming\Dev-Cpp\bin;I:\...\...\FreeBASIC;%PATH%
Then I change to directory:
Code:
cd I:\...\...\FreeBASIC\src\rtlib
... and than I call make.

ad 2) I already created all output directories before

ad 3) Compiler is called by make


The problem is, that if I do not change the makefile, the compiler does not find the *.h files from directory ./src/rtlib because the *.c files in the directory ./src/rtlib/win32 does include:
Code:
#include "fb.h"
but instead I think it should include
Code:
#include "../fb.h"

if I change makefile (see my first posting) the compiler finds the fb.h file.

cu, helpy
Reply
#5
Quote:I had to copy *.h from the rtlib folder to the rtlib/win32 folder to get it to compile here.

This is a second solution! But compilation works, if I change the makefile.

cu, helpy
Reply
#6
OK! I found a way without changing the makefile and without copying the *.h files. I changed my batch file. Now it sets the environment variable
Code:
set C_INCLUDE_PATH=.
... before I call make. Than it compiles rtl without errors :-).

cu, helpy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)