Check-in [0e71626442]
Overview
Comment:Updated to not error out about not being able to load the library until we actually need to use it
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0e71626442d6cb428804f7ec5be770d81ecb4f50
User & Date: rkeene on 2014-06-23 01:51:33
Other Links: manifest | tags
Context
2014-06-23
02:20
Updated to default to building and linking shared check-in: b9a7430007 user: rkeene tags: trunk
01:51
Updated to not error out about not being able to load the library until we actually need to use it check-in: 0e71626442 user: rkeene tags: trunk
01:47
Used more appropriate return value check-in: 08ca5c9084 user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [f0b6dd4e2e] to [30ebc63823].

     1      1   # tcc.tcl - library routines for the tcc wrapper (Mark Janssen)
     2      2   
     3      3   namespace eval tcc4tcl {
     4      4   	variable dir 
     5      5   	variable count
     6      6   
     7      7   	set dir [file dirname [info script]]
            8  +
     8      9   	if {[info command ::tcc4tcl] == ""} {
     9     10   		catch { load {} tcc4tcl }
    10     11   	}
    11     12   	if {[info command ::tcc4tcl] == ""} {
    12     13   		load [file join $dir tcc4tcl[info sharedlibextension]] tcc4tcl
    13     14   	}
    14         -	if {[info command ::tcc4tcl] == ""} {
    15         -		error "Unable to load tcc4tcl shared library"
    16         -	}
    17     15   
    18     16   	set count 0
    19     17   
    20     18   	proc new {{output ""} {pkgName ""}} {
    21     19   		variable dir
    22     20   		variable count
    23     21   
................................................................................
   187    185   				set tcc_type "dll"
   188    186   			}
   189    187   			default {
   190    188   				set tcc_type $state(type)
   191    189   			}
   192    190   		}
   193    191   
   194         -		tcc4tcl $dir $tcc_type tcc
          192  +		if {[info command ::tcc4tcl] == ""} {
          193  +			return -code error "Unable to load tcc4tcl library"
          194  +		}
          195  +
          196  +		::tcc4tcl $dir $tcc_type tcc
   195    197   
   196    198   		foreach path $state(add_inc_path) {
   197    199   			tcc add_include_path $path
   198    200   		}
   199    201   
   200    202   		foreach path $state(add_lib_path) {
   201    203   			tcc add_library_path $path