Problem compiling *.cpp files

BlitzMax Forums/BlitzMax Beginners Area/Problem compiling *.cpp files

kenshin(Posted 2010) [#1]
I'm having a bit of noob trouble compiling .cpp files.

I have MingW 5.1.3 installed to C:\MinGW and BlitzMax v1.41 installed to C:\BlitzMax. I've set the following environment variables :

GCC_EXEC_PREFIX - C:\MinGW
MINGW - C:\MinGW

and the path has these added:

%SystemRoot%\System32\Wbem;C:\MinGW\Bin;C:\BlitzMax\bin;C:\MinGW\libexec\gcc\mingw32\3.4.5

I have copied the contents of the MinGW\libexec\gcc\mingw32\3.4.5 directory into MinGW\bin folder

I also copied ld.exe and ar.exe to the C:\BlitzMax\bin folder.

The BMax About window reports:

FASM 1.68
GCC 3.4.5
G++ 3.4.5

I'm able to "Rebuild All Modules" and that finishes with no problems.

Now I have a folder on C:\ with 2 files in it.

One is called test.bmx and it contains:

Import "testcpp.cpp"


The other file, created with notepad is called testcpp.cpp and it contains:
#Include <stdio.h>


When I try to compile test.bmx I get this error:

Building test
Compiling:testcpp.cpp
C:/Epicv20/testcpp.cpp:1:2: invalid preprocessing directive #Include
Build Error: failed to compile C:/Epicv20/testcpp.cpp
Process complete


What have I done wrong this time?

Last edited 2010


Jesse(Posted 2010) [#2]
c/c++ is case sensitive Include should be include. No capitals.


kenshin(Posted 2010) [#3]
Thanks heaps. That was it.