I am trying to compile a project with MinGW that uses the fltk library. Whenever it gets to the file using fltk, it tells me "cannot find -lfltk".
I know it comes down to getting the .dll for the library and where I put it, but I am having a lot of trouble figuring this out. I found two files in the fltk folder named fltk.lib.dsp and fltkdll.dsp. I tried to just put these files in my system32 folder, but that did not work. I'm guessing thats because these are both VC++ 6 project files and not actually .dll and .lib files. I found this article:
http://www.fltk.org/articles.php?L372+I0+TFAQ+P1+Q
but I don't understand what it is saying.
you will need to define the FL_DLL preprocessor symbol to get the correct linkage commands embedded within the FLTK header files.
What does that mean? Do I need to #define something before my includes? How does this sentence translate into code?
If I am not on the right track please tell me. Any help is appreciated.
edit:
Also, I have my PATH variable set to C:\MinGW/bin/. I tried setting the files in there, but that did not work either. I know I have to do something to these .dsp files, but don't know what.
the error message is not related to dll.
it actually says that the linker library named 'libfltk.a' is not found.
so you should have that library first for compiling your program.
Related
I am a beginner in Objective-C language. I have downloaded and installed GNUstep msys and GNUstep core and installed them in order, as mentioned in the downloads page of GNUstep.
But, I think that the installation isn't correct, because whenever I try to compile an Objective-C source file, it shows fatal error Foundation/Foundation.h file not found. Means, due to some reasons, the path to the header files isn't valid.
Although I am now successfully able to compile the source file with the -I and -L options, I faced another problem. After compilation, when I run the compiled exe file, it shows an error that many dll files are missing, such as objc-4.dll, gnustep-base-1_24.dll to name a few of them. But, I found all of these files present under the /GNUstep/System/Tools folder. When I copied these dll files to my main working (home) directory, it runs successfully without any errors.
Why is this happening? All the tutorials I found on the internet shows very simply the compiling and running of Objective-C programs in Windows without changing so many things. Am I missing something? I have searched many times in StackOverflow and also on the internet, but none of those solved this problem. Please help me and thanks in advance.
P.S. - I have installed GNUstep in the default C:/GNUstep/ folder and included the C:/GNUstep/bin/ and C:/GNUstep/msys/1.0/bin/ folders in the PATH environment variable.
I noticed that there are more than one gcc.exe files present on my system for three different programming language compilers and their parent folders are included in the PATH environment variable. So, the gcc command conflicted with those three executables and therefore, the path to the dll files become invalid.
So, I had to move the GNUstep's bin directory to the top of the PATH environment variable to ensure that the GNUstep's gcc executable is used. And now, everything works like a charm.
I am trying to get CMake to work with Embarcadero 10.2.3 (Tokyo). I see a some help and blogs. I looks fine (I haven't tried so far), but I get confused about the existing cbproj file that I have. I get the impression that I need a CMake file list (CMakeLists.txt) as well as a cbproj file, if I need to build from the IDE. So in that case, any time I need to add files or settings I need to do in both. Is this true?
Thanks.
I have compiled Lua 5.3 as a 32 bit c++ DLL and exe. The DLL contains all the lua code except for lua.cpp and luac.cpp. The exe compiles lua.cpp and uses the DLL to run the lua interpreter. This works fine when running on its own from the command line. I wish to be able to run from the IDE using this DLL and exe.
If I replace /ZeroBraneStudio/bin/lua53.dll and lua53.exe with my own versions, I can run scripts (clicking the two green arrows). However, debugging does not work, giving the following error:
The procedure entry point luaL_addlstring could not be located in the dynamic link library lua53.dll.
I can see that this is happening because the debugger is making use of luasocket. \ZeroBraneStudio\bin\clibs53\socket\core.dll is dependent on lua53.dll, and is expecting it to contain lua compiled as c.
So, what is the correct solution to this - is it to compile luasocket as c++ as well?
(And, if so, does anybody have instructions/guidance for doing so? I have been unable to find anything on this.)
Thanks.
I'm not sure how exactly the DLL was compiled, but the error message likely indicates that the luaL_addlstring and other functions are not exported by it. If the symbols are exported correctly, you should be able to load luasocket and get the debugging working. See this thread for the related discussion.
Also, you don't need to replace lua53 library and executable, as you can configure the IDE to use your own copy of it using path.lua53 configuration setting as described in the documentation.
Okay, I was able to get it working. The solution was to compile luasocket as c++. I won't give full instructions on how to do this here, but some points to hopefully help anybody else with the same issue:
Got luasocket from here: https://github.com/diegonehab/luasocket
Renamed all *.c files to *.cpp
Renamed Lua52.props to Lua.props (I am using lua 5.3 but seems like it is compatible?)
Placed lua headers and lib in appropriate folders
Opened solution in Visual Studio 2012
Fixed up minor issues with project files, like the renaming of the files.
Added 'extern "C"' to declaration of luaopen_socket_core and luaopen_mime_core functions (necessary for lua to be able to load libraries).
Built solution
Copied new dlls into clibs53/socket and clibs53/mime folders.
I used Dependency Walker to help with this. If anybody wants further details in the future please leave a comment.
So I'm trying to recreate and implement a section of code from a JavaScript file. I need to be able to use "Zlib.Deflate.compress" or something equivalent that will get me the exact same results.
I downloaded Zlib which included the .dll, 2 header files and a .lib file. but i cant figure out how to implement this into my application. I've tried to add it as a resource but i keep getting an error "A reference could not be added. Please make sure this file is accessible, and its a valid assembly or COM Component"
I tried using the method on http://msdn.microsoft.com/en-us/library/ms235636(v=vs.80).aspx to create a .dll file out of the header and .lib files, but that gave me a build error as well.
I don't know where to go from here.
Just use the native .NET DeflateStream class it should do exactly what you're looking for and doesn't require any third party libraries. Just the framework itself.
I have a .dll file which I've decompiled with the software called "Reflector7.4.1" to get the source code. After decompiling, to my surprise, I got a folder instead of a single source code file.The folder contained a bunch of other files and subfolders with files.
I have identified the file in which I have to modify the code.But the problem is,after I have modified the only 1 file, how do I compile the whole bunch of folders and subfolders and many other files that I have not edited-into a single .dll file as they were before?
You should not recompile decompiled code, since the compilation process is not completely reversible, even for .NET binaries. There are many missing libraries you might need, mismatches in libraries, etc. I would suggest decompiling and then patching the DLL using a .NET assembly editor of some sort.
Reflexil is one you should check out.
You should also understand .NET disassembly and understand how to move back and forth from the decompiled source and the binaries, so you'll know exactly what you want to change.