Board index » cppbuilder » Can't find SYSTEM.OBJ for linking in a .PAS file
Greg Toew
![]() CBuilder Developer |
Sun, 03 Mar 2002 03:00:00 GMT
|
Greg Toew
![]() CBuilder Developer |
Sun, 03 Mar 2002 03:00:00 GMT
Can't find SYSTEM.OBJ for linking in a .PAS file
My project is now compiling my .PAS file, since I included the correct
directories to find SYSTEM.PAS. Now the linker cannot find SYSTEM.OBJ which does not even exist. Does anyone have a similar experience or a solution? Thanks, |
Team
![]() CBuilder Developer |
Mon, 04 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS file: "Greg Toews" <gto...@pacificcoast.net> wrote: Quote>My project is now compiling my .PAS file, since I included the correct -- |
Greg Toew
![]() CBuilder Developer |
Mon, 04 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS fileStefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> wrote in message Quote> Remove that directory again. You must not compile SYSTEM.PAS. When I remove the directory it won't even compile because it says it cannot find SYSTEM.PAS. This is really confusing. Greg |
Team
![]() CBuilder Developer |
Mon, 04 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS file: "Greg Toews" <gto...@pacificcoast.net> wrote: Quote>When I leave in the directory my file will compile but not link. Options... Library) Quote>This is really confusing. System files and you are now paying for it, I am afraid. Just to make sure - you do have a VCL-enabled application, don't you? -- |
Greg Toew
![]() CBuilder Developer |
Mon, 04 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS fileNow it works and I have no idea why. Each time I create the project by selecting New... from the File menu and What determines VCL-enabled? Greg Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> wrote in message Quote> : "Greg Toews" <gto...@pacificcoast.net> wrote: |
Greg Toew
![]() CBuilder Developer |
Tue, 05 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS fileNow that everything is compiling/linking ok I need (hopefully) one last bit of help. I want to call a pascal function (obviously in my .pas file) from my .cpp file. To call a c function in another cpp file all I do is create a declaration in a .h file. So far this does not work for the pascal function. The linker says that there is an unresolved external Convert_CMN_to_SRF(char My DLL WinTSS.CPP file looks like this (relevant code only): USEUNIT("CMN2SRF.pas"); Quote} UNIT CMN2SRF; BEGIN |
Team
![]() CBuilder Developer |
Tue, 05 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS file: "Greg Toews" <gto...@pacificcoast.net> wrote: Quote>What determines VCL-enabled? can choose not to use the VCL in some command-line projects. -- |
Team
![]() CBuilder Developer |
Tue, 05 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS file: "Greg Toews" <gto...@pacificcoast.net> wrote: Quote>I want to call a pascal function generate a HPP file. #include that HPP file. -- |
Greg Toew
![]() CBuilder Developer |
Tue, 05 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS fileThanks... but that just changed the error message to: Unresolved external '__fastcall Cmn2srf::Convert_CMN_to_SRF(char *,char I tried adding Cmn2srf.obj to the project but that made no difference. I Is there a particular way I need to define the function in the .PAS file? My Greg Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> wrote in message Quote> : "Greg Toews" <gto...@pacificcoast.net> wrote: |
Team
![]() CBuilder Developer |
Tue, 05 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS file: "Greg Toews" <gto...@pacificcoast.net> wrote: Quote>Unresolved external '__fastcall Cmn2srf::Convert_CMN_to_SRF(char *,char type function Convert_CMN_to_SRF(CMN_File: StrPtr): Integer; I am quite surprised about the error message you get. What is the exact Quote>Is there a particular way I need to define the function in the .PAS file? -- |
Greg Toew
![]() CBuilder Developer |
Tue, 05 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS fileThe Cmn2srf.hpp file looks like this: The function actually has 6 parameters (all type StrPtr) I just shortened it for readability. #pragma delphiheader begin //-- user namespace Cmn2srf typedef char *StrPtr; //-- var, const, Quote} /* namespace Cmn2srf */ using namespace Cmn2srf; #endif #pragma option pop // -w- #pragma delphiheader end. Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> wrote in message Quote> I am quite surprised about the error message you get. What is the exact |
Team
![]() CBuilder Developer |
Fri, 08 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS file: "Greg Toews" <gto...@pacificcoast.net> wrote: Quote>The Cmn2srf.hpp file looks like this: for the StrArr = PACKED ARRAY [1..512] OF char; part than the C++ compiler, namely: Object Pascal: '__fastcall File1::Convert_CMN_to_SRF(char[512] *)' Solution: Change the Object Pascal code to read StrPtr = PChar; WARNING: PChar's are zero-based, i.e. they are indexed [0..512-1]. You can type function Convert_CMN_to_SRF(InterfacedCMN_File: PChar): Integer; Which solution you emply is up to you; looking at your Pascal code and In case you have questions about the Object Pascal code I recommend asking -- |
Greg Toew
![]() CBuilder Developer |
Fri, 08 Mar 2002 03:00:00 GMT
Re:Can't find SYSTEM.OBJ for linking in a .PAS fileMoments before I read your last message I made the discovery that the problem was related to parameters, I eliminated StrPtr and used StrArr for all parameters and the code compiled at last!!! Thank you for all the help and the suggestions for passing the string You are correct that the code is very old. Thanks again, Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> wrote in message Quote> The reason for the problem is that DCC32 generates different information |