From 78643cbff732d391b521f9f57d0f9810d2ec8d68 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 12 May 2018 13:49:33 +0200 Subject: [PATCH] fix paths to start app either by *.bat file or directly from Visual Studio --- visualc/ng_shared_xspice_v/ng_shared_start.bat | 1 + visualc/ng_shared_xspice_v/src/main_xspice.c | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/visualc/ng_shared_xspice_v/ng_shared_start.bat b/visualc/ng_shared_xspice_v/ng_shared_start.bat index 8b3af437e..a1672e5e8 100644 --- a/visualc/ng_shared_xspice_v/ng_shared_start.bat +++ b/visualc/ng_shared_xspice_v/ng_shared_start.bat @@ -1,2 +1,3 @@ +cd x64 start /B .\Debug\ng_shared_test_v.exe PAUSE diff --git a/visualc/ng_shared_xspice_v/src/main_xspice.c b/visualc/ng_shared_xspice_v/src/main_xspice.c index 18113355b..0968cb727 100644 --- a/visualc/ng_shared_xspice_v/src/main_xspice.c +++ b/visualc/ng_shared_xspice_v/src/main_xspice.c @@ -1,13 +1,13 @@ /* -Test file for shared ngspice -Copyright Holger Vogt 2013 +Test file for shared ngspice with event nodes +Copyright Holger Vogt 2018 ngspice library loaded dynamically Test 1 Load and initialize ngspice Source an input file adder_mos.cir -Run the simulation for 5 seconds in a background thread +Run the simulation for 0.5 seconds in a background thread Stop the simulation for 3 seconds Resume the simulation in the background thread Write rawfile @@ -123,10 +123,7 @@ int main() #ifdef __CYGWIN__ loadstring = "/cygdrive/c/cygwin/usr/local/bin/cygngspice-0.dll"; #elif _MSC_VER -// loadstring = "ngspice.dll"; -// loadstring = "..\\..\\..\\ngspice\\visualc\\sharedspice\\Debug.Win32\\ngspice.dll"; -// loadstring = "..\\..\\..\\ngspice\\visualc\\sharedspice\\ReleaseOMP.Win32\\ngspice.dll"; - loadstring = "D:\\Spice_general\\ngspice\\visualc\\sharedspice\\Debug.Win32\\ngspice.dll"; + loadstring = "..\\..\\sharedspice\\Debug.x64\\ngspice.dll"; #elif __MINGW32__ loadstring = "D:\\Spice_general\\ngspice\\visualc-shared\\Debug\\bin\\ngspice.dll"; #else @@ -197,7 +194,7 @@ int main() #elif __MINGW32__ ret = ((int * (*)(char*)) ngSpice_Command_handle)("source D:\\Spice_general\\ngspice_sh\\examples\\shared-ngspice\\counter-test.cir"); #elif _MSC_VER - ret = ((int * (*)(char*)) ngSpice_Command_handle)("source ./examples/counter-test.cir"); + ret = ((int * (*)(char*)) ngSpice_Command_handle)("source ../examples/counter-test.cir"); #else ret = ((int * (*)(char*)) ngSpice_Command_handle)("source ../examples/counter-test.cir"); // ret = ((int * (*)(char*)) ngSpice_Command_handle)("source adder_mos.cir"); @@ -341,7 +338,7 @@ test2: #elif __MINGW32__ ret = ((int * (*)(char*)) ngSpice_Command_handle)("source D:\\Spice_general\\ngspice_sh\\examples\\shared-ngspice\\counter-test.cir"); #elif _MSC_VER - ret = ((int * (*)(char*)) ngSpice_Command_handle)("source ./examples/adder_mos.cir"); + ret = ((int * (*)(char*)) ngSpice_Command_handle)("source ../examples/adder_mos.cir"); #else ret = ((int * (*)(char*)) ngSpice_Command_handle)("source ../examples/counter-test.cir"); // ret = ((int * (*)(char*)) ngSpice_Command_handle)("source adder_mos.cir");