-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"-L" parameter on Windows 11 #102
Comments
Hi @lacroiro ! thanks for your feedback! In various experiments on this issue, I also met this problem and my conclusion is that it is a Windows OS restriction, that of limiting the runtime link of libraries only to certain directories, like C:/Windows/System etc. plus the current one where the executed program is located (in this case CJIT itself). I may still be wrong about this assumption, but that's how far I got, thinking that it may be too invasive of a solution to copy cjit.exe and DLLs found into the current directory before execution, which is an implicit modification of the filesystem state which I'd like to avoid. I am very happy if you find the time to experiment a bit further and share your findings. ciao |
I've never had this problem with Visual Studio or GCC on Windows. Maybe it has something to do with dealing only with the DLL rather than the LIB file. For Visual Studio or GCC on Windows, you point the compiler/linker to the LIB and not the DLL. I have both Visual Studio and TDM-GCC installed and decided to do the same test with GCC on Windows. The LIB files are located in D:\Program Files\IBM\MQ\tools\Lib64\ directory and the DLL files are located in the D:\Program Files\IBM\MQ\bin64\ directory. First, I did the following command pointing to the LIB directory: Next, I did the following command pointing to the DLL directory: So, clearly, it is not a Windows 11 permission issue. later |
I just played around with the '-v' parameter and I noticed that CJIT is not including the '-L' directory.
and the output is:
CJIT does not appear to add the '-L' path to its own library paths. The other weird thing I noticed that when use the '-v' parameter, CJIT does not compile & run the C source code. The manpage says:
But that last sentence does not appear to be true. I get the same output if just type "cjit -v" on the command line.
later |
Many thanks Roger! I don't have enough experience nor any other toolchain on win11 to try so this troubleshooting is very helpful and now I guess the fix should be easy. I will first make sure that -L works on windows and then also make sure that -v doesn't interrupts the execution of the command. |
I cannot get the "-L" parameter to work on Windows 11. The "-I" parameter for header file seems to work but not the "-L" parameter.
I was trying out CJIT with IBM MQ and compiling/running one of their sample programs called amqsbcg0.c.
Per CJIT docs, the command should be:
cjit -I"D:\Program Files\IBM\MQ\tools\c\include" -lmqm -L"D:\Program Files\IBM\MQ\bin64" amqsbcg0.c -- TEST.Q1 MQWT1
But when I run that command, I get the following error:
I have the correct path and file name:
If I copy the 'mqm.dll' file to the same directory as the source code then change the command to the following then it works:
cjit -I"D:\Program Files\IBM\MQ\tools\c\include" -lmqm amqsbcg0.c -- TEST.Q1 MQWT1
Am I doing something wrong or is there a bug in CJIT?
Any pointers would be helpful.
later
Roger
The text was updated successfully, but these errors were encountered: