Skip to content

Commit

Permalink
solve build error
Browse files Browse the repository at this point in the history
  • Loading branch information
vintagewang committed Jun 10, 2012
1 parent 02424f1 commit b74e58e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 8 additions & 0 deletions project/jwrapper.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\src\DLL.cpp"
>
</File>
<File
RelativePath="..\src\JavaConfig.cpp"
>
Expand All @@ -193,6 +197,10 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\src\DLL.h"
>
</File>
<File
RelativePath="..\src\JavaConfig.h"
>
Expand Down
4 changes: 2 additions & 2 deletions src/DLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DLL::DLL(const char* file) : dll(NULL)
{
assert(NULL != file);

#ifdef
#ifdef WIN32
this->dll = ::LoadLibraryA(file);
#else
this->dll = dlopen(file, RTLD_NOW + RTLD_GLOBAL);
Expand All @@ -33,7 +33,7 @@ DLL::DLL(const char* file) : dll(NULL)
DLL::~DLL()
{
if(NULL != this->dll) {
#ifdef
#ifdef WIN32
::FreeLibrary(this->dll);
#else
::dlclose(this->dll);
Expand Down
4 changes: 1 addition & 3 deletions src/JavaConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ bool JavaConfig::load()
fprintf(stderr, "You must set JAVA_HOME environment variable or set it in config file.\n");
return false;
}
JWUtil::setEnv("JAVA_HOME", this->javaHome.c_str());

// JVM Type
this->jvmType = pt.get<string>("java.jvmtype");
Expand Down Expand Up @@ -114,9 +115,6 @@ bool JavaConfig::load()
return false;
}


JWUtil::setEnv("JAVA_HOME", this->javaHome.c_str());

return true;
}

Expand Down

0 comments on commit b74e58e

Please sign in to comment.