OSX .app compiles but with runtime dylib errors

Regular binary compilation works, manual wxWidgets compile required for
app (port version doesn’t work for me).
Fixed-up app has runtime errors with dylib files but otherwise verifies…
This commit is contained in:
Charles J. Cliffe
2015-02-17 21:26:14 -05:00
parent 3fe342719c
commit 9d9bb8f103
6 changed files with 114 additions and 32 deletions
+18
View File
@@ -1,5 +1,7 @@
#define OPENGL
#include "CubicSDRDefs.h"
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
@@ -13,9 +15,25 @@
#include "CubicSDR.h"
#include "AppFrame.h"
#ifdef _OSX_APP_
#include "CoreFoundation/CoreFoundation.h"
#endif
IMPLEMENT_APP(CubicSDR)
bool CubicSDR::OnInit() {
#ifdef _OSX_APP_
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
char path[PATH_MAX];
if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX))
{
// error!
}
CFRelease(resourcesURL);
chdir(path);
#endif
if (!wxApp::OnInit())
return false;
-7
View File
@@ -5,13 +5,6 @@
#include <map>
#include <string>
#include <atomic>
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/thread.h"
#include "AudioThread.h"
#include "ThreadQueue.h"
-7
View File
@@ -2,13 +2,6 @@
#include <queue>
#include <vector>
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/thread.h"
#include "liquid/liquid.h"
#include "AudioThread.h"
-7
View File
@@ -2,15 +2,8 @@
#include <atomic>
#include "wx/wxprec.h"
#include "rtl-sdr.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/thread.h"
#include "ThreadQueue.h"
#include "DemodulatorMgr.h"
+2 -4
View File
@@ -39,15 +39,13 @@ void PrimaryGLContext::CheckGLError() {
return;
if (err == errLast) {
wxLogError
(wxT("OpenGL error state couldn't be reset."));
std::cout << "OpenGL error state couldn't be reset." << std::endl;
return;
}
errLast = err;
wxLogError
(wxT("OpenGL error %d"), err);
std::cout << "OpenGL Error " << err << std::endl;
}
}