History

compiling in emcc and linking in gcc, but emcc still gives mysterious linker error

Jack Atherton committed 7 years ago

Commit 4e4ce691 parent 028f3a623 files · +4214 −4206Browse files

Showing the changes to src/core/util_string.cpp (1 of 23 files). Show all

Unified · Split

src/core/util_string.cpp+24−24
@@ -365,28 +365,28 @@ done: · 364 unmodified lines
365 365
366#include <glob.h>366#include <glob.h>
367 367
368char* CreatePathByExpandingTildePath(const char* path)368//char* CreatePathByExpandingTildePath(const char* path)
369{369//{
370 glob_t globbuf;370// glob_t globbuf;
371 char **v;371// char **v;
372 char *expandedPath = NULL, *result = NULL;372// char *expandedPath = NULL, *result = NULL;
373 373//
374 assert(path != NULL);374// assert(path != NULL);
375 375//
376 if (glob(path, GLOB_TILDE, NULL, &globbuf) == 0) //success376// if (glob(path, GLOB_TILDE, NULL, &globbuf) == 0) //success
377 {377// {
378 v = globbuf.gl_pathv; //list of matched pathnames378// v = globbuf.gl_pathv; //list of matched pathnames
379 expandedPath = v[0]; //number of matched pathnames, gl_pathc == 1379// expandedPath = v[0]; //number of matched pathnames, gl_pathc == 1
380 380//
381 result = (char*)calloc(1, strlen(expandedPath) + 1); //the extra char is for the null-termination381// result = (char*)calloc(1, strlen(expandedPath) + 1); //the extra char is for the null-termination
382 if(result)382// if(result)
383 strncpy(result, expandedPath, strlen(expandedPath) + 1); //copy the null-termination as well383// strncpy(result, expandedPath, strlen(expandedPath) + 1); //copy the null-termination as well
384 384//
385 globfree(&globbuf);385// globfree(&globbuf);
386 }386// }
387 387//
388 return result;388// return result;
389}389//}
390 390
391#endif // __PLATFORM_WIN32__391#endif // __PLATFORM_WIN32__
392 392
@@ -430,8 +430,8 @@ std::string get_full_path( const std::string & fp ) · 37 unmodified lines
430 430
431std::string expand_filepath( std::string & fp )431std::string expand_filepath( std::string & fp )
432{432{
433#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)433#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__EMSCRIPTEN__)
434 // no expansion in Windows systems434 // no expansion in Windows systems or Emscripten
435 return fp;435 return fp;
436#else436#else
437 437

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t