I have compiled and run my program successfull through the Dev C++ IDE. However if I try to run the .exe that is generated I get a error pop up stating, "The procedure entry point "blah blah" could not be located in the dynamic link libvray libvlc.dll. The libvlc.dll is what I'm trying to link to. I'm using my own make file show below.
I'm stumped becuase I don't understand why clicking compile/run in the IDE will execute the program fine but clicking the .exe results in several pop errors but then it runs fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Where did you put the DLL file itself? Is there more than one different version of libvlc.dll on your system.
The -lvlc linker option links the libvlc.a export library, not the DLL itself, that is linked at runtime by the OS. The OS will use the DLL in the same folder as the executable if there is one, and then search the paths specified in the PATH environment variable otherwise. Dev-C++ modifies the environment for its own purposed while running, so it is possible that the OS is resolving the link at runtime using different versions of the DLL.
Start by checking the system for multiple copies of the DLL. Move the one you want to the application folder or eradicate the ones you don't need.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you so much for the response. It did appear I had two versions of the DLL and I was linking to both of them. I removed the unnecessary link and linked only to the latest version and everything appears to be working correctly now. Thank you for your help that was exactly what my problem was.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have compiled and run my program successfull through the Dev C++ IDE. However if I try to run the .exe that is generated I get a error pop up stating, "The procedure entry point "blah blah" could not be located in the dynamic link libvray libvlc.dll. The libvlc.dll is what I'm trying to link to. I'm using my own make file show below.
Project: test2
Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -L"./" -lvlc
INCS = -I"C:/Dev-Cpp/include" -I"C:/../source/vlc-0.9.2/include"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/../source/vlc-0.9.2/include"
BIN = test2.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before test2.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "test2.exe" $(LIBS)
main.o: main.cpp
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
I'm stumped becuase I don't understand why clicking compile/run in the IDE will execute the program fine but clicking the .exe results in several pop errors but then it runs fine.
thanks.
Where did you put the DLL file itself? Is there more than one different version of libvlc.dll on your system.
The -lvlc linker option links the libvlc.a export library, not the DLL itself, that is linked at runtime by the OS. The OS will use the DLL in the same folder as the executable if there is one, and then search the paths specified in the PATH environment variable otherwise. Dev-C++ modifies the environment for its own purposed while running, so it is possible that the OS is resolving the link at runtime using different versions of the DLL.
Start by checking the system for multiple copies of the DLL. Move the one you want to the application folder or eradicate the ones you don't need.
Clifford
Thank you so much for the response. It did appear I had two versions of the DLL and I was linking to both of them. I removed the unnecessary link and linked only to the latest version and everything appears to be working correctly now. Thank you for your help that was exactly what my problem was.