Hello, I am new to this list, so "HELLO TO EVERYBODY" About my programming subject: I am investigating for a small naval architectural bureau, If they can port their DOS/WIN pascal programs to linux. I am a student of naval architecture with small programming experience under Pascal and C++. The company also asked me to have a look at GUI toolkits and write a graphical subsystem for their pascal program. I would like to use QT for this purpose. I made some small tests already, and found out that the compatibility with GPC and Prospero extended pascal is sufficient (small problems). My problem is that I can not use a c++ library in my pascal program. For C everything works allright, but as soon as I compile with g++ I get errors. I also noticed that the assembler output of the compiler is different when compiling C or C++ sources. I tried compiling with gpc -x, etc. Still I run into problems. I use gpc based on egcs 1.1.2 as well as based on gcc 2.95.2 (on two different pc's). Attached is a small, very dumb test program, partially stolen from the excellent info pages of gpc. It consists of two files: add_one.c and test.pas test.pas is the program; it writes the number five, and lets the function number_pp add one (+1) to the number. It then displays number again. I compiled it in several ways, of which this one is the simplest: gcc -c add_one.c gpc -o test test.pas add_one.o If the first line is replaced with: g++ -c add_one.c line number two fails linking. Does anybody have an idea of how to use c++ libraries in pascal? Help is very much appreciated. Greetings, Menno Schaap
participants (7)
-
Frank Heckenbach -
Jo Dillon -
marcov@stack.nl -
Menno Schaap -
miguell@inicia.es -
Prof Abimbola Olowofoyeku -
ser@perio.unlp.edu.ar