@@ -80,10 +80,11 @@ # External functions if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} { set handle [tcc4tcl::new] $handle cwrap curl_version {} vstring + $handle add_library_path [::tcl::pkgconfig get libdir,runtime] $handle add_library_path /usr/lib64 $handle add_library_path /usr/lib $handle add_library_path /usr/lib32 $handle add_library curl $handle go @@ -103,10 +104,11 @@ if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} { set tmpfile "/tmp/DELETEME_tcc4tcl_test_exec[expr rand()].so" file delete $tmpfile set handle [tcc4tcl::new $tmpfile "myPkg 0.1"] $handle cproc ext_add {int a int b} long { return(a+b); } + $handle add_library_path [::tcl::pkgconfig get libdir,runtime] $handle add_library_path /usr/lib64 $handle add_library_path /usr/lib $handle add_library_path /usr/lib32 $handle add_library tclstub${::tcl_version} $handle go @@ -135,10 +137,11 @@ curl_easy_perform(handle); return(TCL_OK); } $handle add_include_path /usr/include + $handle add_library_path [::tcl::pkgconfig get libdir,runtime] $handle add_library_path /usr/lib64 $handle add_library_path /usr/lib $handle add_library_path /usr/lib32 $handle add_library curl $handle go @@ -157,11 +160,11 @@ if {[callToTcl 3 5] != 8} { error "3 + 5 is 8, not [callToTcl 3 5]" } set handle [tcc4tcl::new] -$handle proc callToTcl1 {} float { +$handle proc callToTcl1 {int x} float { return 0.1 } -$handle cwrap callToTcl1 {} float +$handle cwrap callToTcl1 {int x} float $handle go -puts [callToTcl1] +puts [callToTcl1 3]